function get(e, t, a) {
    ajax(e, "GET", t, a)
}
function post(e, t, a) {
    ajax(e, "POST", t, a)
}
function patch(e, t, a) {
    ajax(e, "PATCH", t, a)
}
function ajax(e, t, a, n) {
    $.ajax({
        url: e,
        method: t,
        data: a,
        success: n
    })
}
function message(e, t) {
    void 0 == t ? ($("#message").html(e), $("#message").fadeIn(), setTimeout(function() {
        $("#message").fadeOut()
    },
    2e3)) : 1 == t && alert(e)
}
function iConfirm(e, t) {
    $.messager.defaults = {
        ok: "确定",
        cancel: "取消",
        width: 300,
        modal: !0
    },
    $.messager.confirm({
        title: "确认",
        msg: e,
        fn: t
    })
}
function getDefaultPageSize() {
    var e = $.cookie("pageSize");
    return void 0 == e && (e = 20),
    e
}
function formatImage(e, t, a) {
    return "<img src='" + e + "' style='height:50px;width:50px;'/>"
}
function formatBool(e, t, a) {
    return e ? "是": "否"
}
function formatDate(value, row, index) {
    var date = eval("new " + value.replace(/\//g, ""));
    return date.format("yyyy-MM-dd")
}
function formatTime(e, t, a) {
    return e.toDate().format("yyyy-MM-dd hh:mm")
}
function formatHour(e, t, a) {
    var n = parseInt(e / 24),
    o = e % 24;
    return n < 1 ? o + "小时": o > 0 ? n + "天" + o + "小时": n + "天"
}
function formatStatus(e, t, a) {
    return 1 == e ? "有效": "无效"
}
var msg = {
    noSelect: "请选择要修改的项！",
    createFail: "添加失败，请重试！",
    updateSuccess: "修改成功！",
    updateFail: "修改失败，请重试！"
};
$(document.body).on("click", 'input[type="checkbox"]',
function() {
    void 0 == $(this).attr("checked") ? $(this).attr("checked", "checked") : $(this).removeAttr("checked")
});